﻿using System;
using System.ComponentModel;
using System.Reflection;

namespace MVCSpike
{
    class CatModel : MvcModelBase
    {
        private string m_name;
        private int m_age;

        public String Name
        {
            get { return m_name; }
            set
            {
                if (m_name == value) return;
                m_name = value;

                // if there is a change... raise the event to notify the control
                ObjectChanged(MethodBase.GetCurrentMethod());
            }
        }

        public Int32 Age
        {
            get { return m_age; }
            set
            {
                if (m_age == value) return;
                m_age = value;

                // if there is a change... raise the event to notify the control
                ObjectChanged(MethodBase.GetCurrentMethod());
            }
        }
 
    }
}
